///////////////////////////////////////////////////////////////////////////////
//
// Copyright
//
///////////////////////////////////////////////////////////////////////////////

package ru.goodcore.datastructure
{

import ru.goodcore.errors.GenericError;
import ru.goodcore.errors.GenericErrorCode;

/**
 * Abstract class for Enumerated type 
 * 
 * 
 * @author					Dimarik
 * @version					1.0
 * @playerversion			Flash 9
 * @langversion				3.0
 * 
 * @see						http://en.wikipedia.org/wiki/Enumerated_type
 *
 * @keyword					enum, enumeration, datastructure
 */
public class Enum
{

	include "../../../includes/core/Version.as";

	//-------------------------------------------------------------------------
	//
	//  Constructor
	//
	//-------------------------------------------------------------------------

	/**
	 * Constructor
	 */
	public function Enum(id:String = null) {
		super();

		if ( Object(this).constructor === Enum ) {
			throw new GenericError(GenericErrorCode.CLASS_CANNOT_BE_INSTANTIATED);
		}

		this.id = id;
	}

	//-------------------------------------------------------------------------
	//
	//  Private variables
	//
	//-------------------------------------------------------------------------

	/**
	 * @private 
	 */
	private var id:	String;

	//-------------------------------------------------------------------------
	//
	//  Public methods
	//
	//-------------------------------------------------------------------------

	public function toString():String {
		return this.id;
	}

}
}